home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-19 | 3.4 KB | 161 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: Locrian:WWDCSun:CPlusPlus:Extensn.xh.
- * Generated using:
- * SOM Precompiler somipc: somc/smemit.c
- * SOM Emitter emitxh.dll: somc/smmain.c
- */
-
- /*
- *
- * Theory of Operation
- *
- *
- * Classes defined in this interface
- *
- */
-
-
- #ifndef SOM_ODExtension_xh
- #define SOM_ODExtension_xh
-
- class ODExtension;
-
- #define ODExtension_MajorVersion 0
- #define ODExtension_MinorVersion 0
-
- /* C++ som defs */
- #include <somcls.xh>
-
- /* Include C++ parent defs */
- #ifndef SOM_ODObject_xh
- #include <ODObject.xh>
- #endif
-
- #ifndef ODExtension_API
- #define ODExtension_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
-
- /*
- * End of user-defined types.
- */
-
- #if applec ^ PRAGMA_LIB_EXPORT
- #pragma lib_export on
- #endif
-
-
- /* A procedure to create the ODExtension Class */
- SOMEXTERN SOMClass * SOMLINK ODExtensionNewClass(
- integer4 majorVersion,
- integer4 minorVersion);
-
- /* The API to the ODExtension class object, and the methods it introduces. */
- typedef struct ODExtensionClassDataStructure {
- SOMClass *classObject;
- somMToken InitExtension;
- somMToken GetBase;
- somMToken Release;
- } ODExtensionClassDataStructure;
- #ifdef SOM_NO_DATA_EXPORTS
- SOMEXTERN ODExtensionClassDataStructure * ODExtensionGetClassData ( void );
- # undef ODExtensionClassData
- # define ODExtensionClassData (*ODExtensionGetClassData())
- #else
- SOMEXTERN ODExtensionClassDataStructure ODExtensionClassData;
- #endif /* SOM_NO_DATA_EXPORTS */
-
- #if applec ^ PRAGMA_LIB_EXPORT
- #pragma lib_export off
- #endif
-
- #define _ODExtension ODExtensionClassData.classObject
-
- /* The API to parentMtabs for ODExtension, and the instance data it introduces. */
- SOMEXTERN struct ODExtensionCClassDataStructure {
- somMethodTabs parentMtab;
- somDToken instanceDataToken;
- } ODExtensionCClassData;
-
- /*
- * -- Typedefs for Procedures that support Methods introduced by ODExtension
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_ODExtension_InitExtension)(ODExtension *somSelf, Environment *ev,
- ODObject** base);
- typedef ODObject* (* SOMLINK somTD_ODExtension_GetBase)(ODExtension *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_ODExtension_Release)(ODExtension *somSelf, Environment *ev);
- }
-
- #endif /* ODExtension_API */
-
-
- /*
- * -- Method Tokens are Thunks
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for ODExtension
- */
- class ODExtension : public ODObject
- {
- public:
-
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- if (!ODExtensionClassData.classObject)
- ODExtensionNewClass(ODExtension_MajorVersion,ODExtension_MinorVersion);
- return (void *)
- ((somTD_SOMClass_somNew)
- somresolve_((SOMObject *)((void*)(ODExtensionClassData.classObject)),
- SOMClassClassData.somNew))
- ((SOMClass *)((void*)(ODExtensionClassData.classObject)));
- }
-
- void operator delete(void * obj)
- {
- ((SOMObject *)obj)->somFree();
- }
-
- /* public method: InitExtension */
- void InitExtension(Environment *ev,
- ODObject** base)
- {
- SOM_Resolve(this,ODExtension,InitExtension)
- (this,ev,base);
- }
-
-
- /* public method: GetBase */
- ODObject* GetBase(Environment *ev)
- {
- return SOM_Resolve(this,ODExtension,GetBase)
- (this,ev);
- }
-
-
- /* public method: Release */
- void Release(Environment *ev)
- {
- SOM_Resolve(this,ODExtension,Release)
- (this,ev);
- }
-
-
-
- }; /* ODExtension */
-
-
-
- #endif /* SOM_ODExtension_xh */
-